package com.wetsion.securityoauthdemo.rmsclient.feign.support;

import com.alibaba.fastjson.JSONObject;
import com.wetsion.securityoauthdemo.rmsclient.feign.RmsFeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author weixin
 * @version 1.0
 * @CLassName AuthService
 * @date 2019/3/12 2:31 PM
 */
@RmsFeignClient(name = "authService", authorization = true)
public interface AuthService {

    @GetMapping(value = "http://localhost:9001/rms/oauth/resources")
    JSONObject resources(@RequestParam("username") String username, @RequestParam("platform") String platform);

    @PostMapping(value = "http://localhost:9001/rms/oauth/test1")
    String test(@RequestBody String body);

    @PostMapping(value = "http://localhost:9001/rms/oauth/test2")
    String test2(@RequestParam("name") String name);
}
